import request from '@/utils/request'

// 查询学研项目列表
export function listProject(query) {
  return request({
    url: '/biz/project/list',
    method: 'get',
    params: query
  })
}

// 查询学研项目详细
export function getProject(id) {
  return request({
    url: '/biz/project/' + id,
    method: 'get'
  })
}

// 新增学研项目
export function addProject(data) {
  return request({
    url: '/biz/project',
    method: 'post',
    data: data
  })
}

// 修改学研项目
export function updateProject(data) {
  return request({
    url: '/biz/project',
    method: 'put',
    data: data
  })
}

// 删除学研项目
export function delProject(id) {
  return request({
    url: '/biz/project/' + id,
    method: 'delete'
  })
}

// 启用禁用学研项目
export function changeStatus(data) {
  return request({
    url: '/biz/project/changeStatus',
    method: 'put',
    data: data
  })
}

// 取消
export function cancel(data) {
  return request({
    url: '/biz/project/cancel',
    method: 'post',
    data: data
  })
}

// 取消
export function audit(data) {
  return request({
    url: '/biz/project/audit',
    method: 'post',
    data: data
  })
}

// 结束活动
export function finish(id) {
  return request({
    url: '/biz/project/finish/'+id,
    method: 'post',
  })
}
